<template>
  <el-calendar>
    <template
      slot="dateCell"
      slot-scope="{date, data}">
      <p :class="data.isSelected ? 'is-selected' : ''">
        {{data.day.split('-').slice(1).join('-') }}
        <span v-for="d in dates">
        {{ data.day==d ? '✔️' : ''}}
        </span>
      </p>
    </template>
  </el-calendar>
</template>

<script>
  import axios from "axios"

  export default {
    name: "SigninList",
    methods: {
      dates() {
        axios.get(this.apiUrl + "/signin/list").then(r => {
          if (r.data.code == "200") {
            return r.data.data;
          }
        })
      }
    },
    mounted() {
      this.dates();
    }
  }
</script>

<style scoped>
  .is-selected {
    color: #1989FA;
  }
</style>
